// 7-5 求矩阵的局部极大值
#include <stdio.h>

int main()
{
    int M, N;
    scanf("%d%d", &M, &N);
    int m[M][N];
    for (int i=0; i<M; i++) {
        for (int j=0; j<N; j++) {
            scanf("%d", m[i]+j);
        }
    }
    int found = 0;
    for (int i=1; i<M-1; i++) {
        for (int j=1; j<N-1; j++) {
            if (m[i][j] > m[i-1][j]
            && m[i][j] > m[i+1][j]
            && m[i][j] > m[i][j-1]
            && m[i][j] > m[i][j+1]) {
                printf("%d %d %d\n", m[i][j], i+1, j+1);
                found++;
            }
        }
    }
    if (found == 0) {
        printf("None %d %d\n", M, N);
    }
    return 0;
}